<!--
 * @FileDescription 相机功能 - 信息
 * @Author 杨宇翔
 * @Date 20220816 11:27:56
 * @LastEditors 杨宇翔
 * @LastEditTime 20220816 11:27:56
-->
<template>
    <div class="camera-information">
        <div class="container">
            <div class="header">
                <span>相机信息</span>
                <span class="material-icons"
                    @click="UsageComponent.Default.CameraInformationVisibility.value = false">×</span>
            </div>
            <table>
                <thead>
                    <tr>
                        <th>名称</th>
                        <th>值</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="[key, value] of datas" :key="key">
                        <td>{{ key }}</td>
                        <td>{{ value }}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</template>

<script setup lang="ts">
import { UsageComponent } from './BinocularCameraComponent';

const datas = new Map<string, string>([
    ['CAN通道数', '2'],
    ['硬件版本号', '2304'],
    ['接口库版本号', '2308'],
    ['中断号', '0'],
    ['类型', 'CANalyst - II'],
    ['版本号', '31C00017EF9'],
]);
</script>

<style scoped>
.camera-information {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;

    backdrop-filter: blur(1rem);
}

.container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    border-radius: 2rem;
    border: solid 0.6rem transparent;
    background-image: linear-gradient(#131620, #131620),
        linear-gradient(90deg, #218cde, #807de1);
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.header {
    width: 100%;

    padding: 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header>span:first-of-type {
    color: white;
    font-size: 2.4rem;
    font-weight: 500;
}

.header>.material-icons {
    color: #81859C;
    font-size: 3.6rem;
}

.container>span {
    padding-left: 3.4rem;
    width: 100%;

    color: #81859C;
    font-size: 2.4rem;
    font-weight: 500;
}

table {
    margin-left: 4rem;
    margin-right: 4rem;
    margin-bottom: 2rem;

    border-collapse: collapse;
}

thead {
    border-bottom: solid #81859C 0.1rem;
}

th {
    color: #81859C;
    font-size: 1.6rem;
    padding-bottom: 1rem;
}

th:first-of-type {
    width: 30rem;
}

td {
    padding-top: 1rem;
    padding-bottom: 1rem;

    color: #B1B1D4;
    font-size: 1.6rem;
}

td:last-of-type {
    text-align: center;
}
</style>